import request from '@/utils/request'


export function listZoning(query) {
  return request({
    url: '/system/zoning/list',
    method: 'get',
    params: query
  })
}

// 查询社区文章列表
export function listArticle(query) {
  return request({
    url: '/system/article/list',
    method: 'get',
    params: query
  })
}

// 查询社区文章详细
export function getArticle(id) {
  return request({
    url: '/system/article/'+id,
    method: 'get',

  })
}

// 新增社区文章
export function addArticle(data) {
  return request({
    url: '/system/article',
    method: 'post',
    data: data
  })
}

// 迁移
export function updateArticle(data) {
  return request({
    url: '/system/article/transfer',
    method: 'post',
    params: data
  })
}
// 置顶/取消置顶
export function topOrCancelTop(data) {
  return request({
    url: '/system/article/topOrCancelTop',
    method: 'post',
    params: data
  })
}
// 隐藏/开发文章
export function hideArticle(data) {
  return request({
    url: '/system/article/hide',
    method: 'post',
    params: data
  })
}
// 删除社区文章
export function delArticle(id) {
  return request({
    url: '/system/article/' + id,
    method: 'delete'
  })
}
